<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" type="text/css" href="../../js/lib/theme-chalk/index.css" />
		<link rel="stylesheet" type="text/css" href="../../css/myCustomer.css" />
		<link rel="stylesheet" type="text/css" href="../../css/my_commont.css" />
		<link rel="stylesheet" type="text/css" href="index.css" />

		<script src="../../common/utilCookie.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../common/author.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/axios.min.js"></script>
		<script src="../../js/jquery.js" type="text/javascript" charset="utf-8"></script>
		<!-- 引入组件库 -->
		<script src="../../js/lib/index.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../common/judegetEmpty.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../common/math.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/aixos-init.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/config.js" type="text/javascript" charset="utf-8"></script>
		<script src="index.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			[v-cloak] {
				display: none;
			}
		</style>
	</head>
	<body>
		<div id="editGoodApp" v-cloak>
			<div class="contaner" v-loading.fullscreen.lock="fullscreenLoading">
				<div class="section-header">
					商品 - -编辑商品信息
				</div>
				<hr class="hr-style" />
				<div class="my_height_20">
					<el-form ref="form" :model="form" label-width="120px">

						<el-form-item label="商品分类">
							<span>{{form.categoryName}}</span>
							<div class="tip-contaner">
								<el-cascader-panel :options="options" v-model="districtDefault" @change="handleChange"></el-cascader-panel>
							</div>
						</el-form-item>

						<el-row>
							<el-col :span="11">
								<el-form-item label="商品名称:" :rules="[
								{required: true, message: '商品名称不能为空'}]">
									<el-input v-model="form.name"></el-input>
								</el-form-item>
								<div class="tip-item tip-item-height">
									<span>商品标题名称长度至少1个字符，最长150个汉字 最多输入40字</span>
								</div>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="11">
								<el-form-item label="本店售价:" :rules="[
								{required: true, message: '本店售价不能为空'}]">
									<el-input v-model="form.newPrice"></el-input>
								</el-form-item>
								<div class="tip-item tip-item-height">
									<span>价格不能高于市场价。此价格不能高于市场价。此价格为商品实际销售价格，如果商品存在规格，该价格显示最低价格。</span>
								</div>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="11">
								<el-form-item label="成本价:" :rules="[
								{required: true, message: '成本价不能为空'}]">
									<el-input v-model="form.oldPrice"></el-input>
								</el-form-item>

							</el-col>
						</el-row>
						<el-row>
							<el-col :span="11">
								<el-form-item label="商品库存数量:" :rules="[
								{required: true, message: '商品库存数量不能为0'}]">
									<el-input v-model="form.inventory"></el-input>
								</el-form-item>
								<div class="tip-item tip-item-height">
									<span>商铺库存数量必须为0~999999999之间的整数</span>
								</div>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="11">
								<el-form-item label="库存警告数量:">
									<el-input v-model="form.inventoryWarning"></el-input>
								</el-form-item>
								<div class="tip-item tip-item-height">
									<span>设置最低库存预警值。当库存低于预警值时商家中心商品列表页库存列红字提醒，请填写0~255的数字，0为不预警。</span>
								</div>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="11">
								<el-form-item label="商品封面：">
									<el-upload  :action="uploadUrl"   list-type="picture"
									 :on-success="handleAvatarSuccess"  :before-remove="beforeAvaterRemove" :file-list="fileAvatarList" :limit="1" :on-exceed="handleAvatarExceed" >
									 <el-button size="small" type="primary">点击上传</el-button>
									</el-upload>
                   
								</el-form-item>
								<div class="tip-item tip-item-height">
									<span>商品封面只能上传一张</span>
								</div>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="11">
								<el-form-item label="商品详情轮播图：">
									<el-upload  :action="uploadUrl"   list-type="picture"
									 :on-success="handleCarouselSuccess" :before-remove="beforeCourseRemove" :file-list="fileCarouselList" :limit="5" :on-exceed="handleCarouselExceed" >
									 <el-button size="small" type="primary">点击上传</el-button>
									</el-upload>
								</el-form-item>
								<div class="tip-item tip-item-height">
									<span>商品详情页的缩略图片图片，最多5张</span>
								</div>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="11">
								<el-form-item label="商品详情图：">
									<el-upload  :action="uploadUrl"   list-type="picture"
									 :on-success="handleDetailSuccess" :before-remove="beforeDetailRemove" :file-list="fileDetailList" :limit="5" :on-exceed="handleDetailExceed" >
									 <el-button size="small" type="primary">点击上传</el-button>
									</el-upload>
								</el-form-item>
								<div class="tip-item tip-item-height">
									<span>商品详情页的缩略图片图片，最多5张</span>
								</div>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="11">
								<el-form-item label="商品单位">
									<el-input v-model="form.unit"></el-input>
								</el-form-item>
								<div class="tip-item tip-item-height">
									<span>商品单位：比如：个，件，份，套。默认为个</span>
								</div>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="11">
								<el-form-item label="商品规格">
									 <el-tag  v-for="item in parameterGroupsList">{{item.combination}}</el-tag>
								</el-form-item>
								
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="11">
								<el-button  type="primary" @click="editGood"> 确认修改</el-button>	
							</el-col>
						</el-row>
					</el-form>
				</div>
			</div>
		</div>
		</div>
	</body>
</html>
